add a hacky way of dealing with struct args/return parameters to js functions