reduces global variables usage for structs