Version 4: handle missing data