restructuring, removed result, added callback