sort out yet more api functions