changed some public to private