Waterloo research makes railway crossings safer with science