mod: make closure as a class
add: unit test for closure
add: display method of closure