adding print statements for debugging