- refactored to make better use of jackson