use closure instead of interface, as it is a litter hard to clone a struct deeply