first iteration json builder with reference