adding mobile optimization code