more encapsulating to functions