Optimised program

Optimised program