fix bug. refactor. implement lambda(wip)