minor cleanup and added logged bool