Updated code to allow for expandability - can now add different animations as arguments