handle init statements of ifs in a simpler way