draft3 of #2 backend, might be finished