fixed bugs in samples 19-33