replaced doc structs with compilable code structs