updating function firm type related code 2