added print statements for better supervision and debugging