pass custom endpoint in options
better error checking
Release 0.2.0