code refact