trying to make this work on both *x machines and windows machines