1. Refactoring led, motion in android