Added nudge function for directional correctness.