implemented player loading and fix some errors