changed return value from int to bool