Changes:
- Change fetch parameter
- Add error and exception handler
- Improve memory usage