handled missing json parameters better
refactored utils and constants