Changed return types from int to bool.