credit to andrew starrett 1