refactoring android slightly