implemented player persistence and tests