added speed option and added win detection