add option 'animated' and bug fixed