refactoring mobile bugs