commented out mergeState since it is not covered by tests and may not be implemented