change helper functions into private