Semi-final version for MSCS
Minor additions
merging with latest changes from Vladimir