copied Karsten's code, doesn't work yet

Process is killed automatically