adding animation example and a cleaning up some edge cases