added comments experimented with c style logging