moves specification checking into parser