added is_interger and non-negative checks