Stable construction according to specification in Lab2.