convert from closure into object