fixed turn function

I changed the parameter for turn so that it accepted a boolean.