added is finite function