fix #4
fix #6
add some transition support