will need to finish this on a unix machine