copied stuff from mobile2 old