modify code for unix system.