idea for determining animation duration