logging function outsourced
useless