changed order of declaration/initialization of variables to prevent some warnings
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
#endif