struct to if terms