works if data are missing