Add new dimension and fix some bugs