75% done on creating logged routines