added API functions (need to test)