Fixes #7  now accepts callback and error callback