removed afunction and did some refactoring
refactored the function to apply DRY
refactored and move the selector to function arg
Merge branch 'develop' into feature/adding_help_button
Merge branch 'feature/adding_help_button' into develop