Aravind | Refactored the directive