created desktop & mobile func