added logging layer