add some type checks
add structs