Rewrite function for adding player