minor changes
minor fixing and debug flag added