edited move and make move logic