reworked api, added express support