resolved ajax error and removed odd design just dimension of function return is remaining