refactoring code Content Provider