clean up, logix fixed