moved print to logging