Improves code logic