added allPlay function to main