fixed bug with direction down, the minus needed to be a plus and greater than should have been less than