refactored getJobs to return {totalFound: int, jobs: object[] }