Replace with better ruby code that includes status and class.