Added function and animation