IMPROVED: use code instead of tt