added maximum number of negative sample