How to optimize this code | open.mp forum