Replace class definition with double