refactoring and added label resource.