changed helper functions to private