getting rid of some extranious variables, and one extra macro