Add constructor for if-statements