small modifications to handle different OSes