fix getwork API

closes #12