Improved if construct