another part of the rewrite effort - not working

the returned closure is not functioning - I'll likely need to return that part
to bash