updated for windows compatibility