refractored
begin optimize visual