sort inputs by name