some code to remove legacy state (to be removed again sometime)