Instead of switching 1 and -1 here, we probably should pass in either 1 or -1