use struct instead of variables