modified for windows system