remove needless state
formatting
use events