@shacker wdyt about running these two ifs in a loop instead? Should pave the way for more DRY code