Improved code for Hints - changed print to return