made it a bit more encapsulated