added delete_undef_values() function