use a structure to reduce function arguments