updated turn based logic