A lot of improvements
proper exceptions
request function