move a few methods to private