refact everything