stupid dos and ends need to match