better handling of empty values