logging mainly for debug - tested complete