Tested on minix. Compiles and runs