updating and optimizing code for tablet and mobile landscape