merged in erics code