changed NULL to NA