code refactoring
added device scripts