added dynamic number of fields