design mat and case refactor done