Opitmise the code

I;ll try to optimise the code