add support for elif, consolidate if statements