Added DEBUG & NDEBUG, array bound check