completely changed logic for getTimeline. still other methods to be refactored
changed formatting