use hashing to create state and action keys