Modified to reflect latest changes