changed "if not defined(.)" into "if !defined(.)" for windows compatibility