updated for missing variable