added level in, replaced cole's version