add opening animation
add closing animation
fix a bug in opening