version without dependency on requests library