Changed it to comply with Mitchell's new globals