added json prettifier
added getRecords method
refactoring