added simple directive and further structuring