working on input structure