change query params to hash state, get and set