removing logging and fixing output