improved api and readme