some clean up to easie understand