refact some