code for mobile platform