fixed bug in hint method and test