how to determine if a loop is positive or negative?