added package file, improved api