refactoring to have consistent json element names