added legend and animations