design mostly ready for implementation
note on marshalling