added omitempty so JSON doesn't emit null elements