Corrected NUM_DIMENTIONS
Added comments