refact player