publicly exposing the setState method