all code before directive