fix #1 add state and #2 add labels