struct to prevent global variables