in progress of changing closure conversion to work with structs instead of literal expressions