snap to grid; closes #8