implemented player data serialisation