refactored the code to use just one directive class
refactored the code to use just one directive class