refactored passing player around