finished some re-organizing