updated code for fields without label