moved managed up into the class because it's not intended to be used elsewhere anyway.