Maybe it isn't that bad if -1 is only returned very seldom. But I don't know what -1 is used for.