Add support for passing data into struct