code cleaning, didnt do it easy while testing