appears to start working now (snap to closest for corners)