refactor backend, still seems to work