adding logging in