improved animation class