created getRedditJSON function