added some things
lib/api refactor