add the code/ pseudo code of the optimise research
we need to analyse the algorithm to optimise the condition (if)