almost done 7/29

Another loop that should be a subroutine (kwargs welcome)