changing logging to logger