modularizing into self-contained closures