added a print to check the functionality