begin to write svg animation using javascript