prettier
Move guard into foreach instead of seperate method