remove the hashmap state and go back to structs