Modified to remove unneeded terms