Solution to problems 1.3 and 1.4 (and cmake files)