remove pointer access to states
cleanup a little