Updated functions for game