refactor directive to seperate folder