removed buggy early-returns