3 private functions moved into api.utils namespace