remove dead code
implement security levels