seperation of android specific code, not fully done though