finished low level api functions