Added function to provide animation