further improved api

STILL BUGGY. DOES NOT WORK ATM.