start supporting foreign structs.. still segfaults