updated mobile logic