class construct before fun def