rechecked most code