replaced DOM based animation with canvas based animation