creating function to write the logic of IS_NEW?