added an animate class and draw method