introduced condition for empty fields