added basic directive function