why it's not passing the last condition?