added new function
changed api a bit, now use key-values here, too