added propper logging