three private functions