updated to compile with TDM