changed some methods to private