make code portable to ANdroid