Changed to return an integer.