Mostly working..need to rewrite using requests