modified version of iSam project for building under Windows