Changed boolean making to funciotn in util, changed logic strucutre of both red and struc