added some animation code