minor fixes & improved ex-7