delete invalid logic