moving over to function closure for some things