renamed some private functions