it's not pretty but it works.