improved Niall's methods