experimenting with animation in javascript