added print statements for logging