add check for empty fields and empty delete field