refining piece movement functionality