migrate sport's code to libs