animate independently of paint events, since we may want to not paint, but still advance animation
refactor a bit