added bool for sljf + error fix