code for year animation