Added startAnimation with duration parameter