added logging statemnts