replaced print() by log()