add filtering of undefineds