resolved logical error