improves clarity of if expression
removes commented out logging / dead code