refactoring, simplify android code