add struct checking