refact problem