add firstMove function in UI