Cleaned up if statement