merged your code with yalnix.c