fix player algo