gradient direction is workig now