cleaned up to reflect latest changes