Successfully made the functions work in parallel

Created a new function *moveOnce* which is to be called each time there
is a move to be made.