added clock, reorganized directives