removed old code from directive