added a few API related functions, need to test them