implement test legal move