switch state lirbraries to use **kwargs