use extend instead of merge, as stateParams and toParams will always be objects