added ultiple dimension support