refactor viewplayers

refactored index action