copied from tutorial
strip comments