provisionary support for struct encoding
add test cases for struct handling