animation and mouse callback