Quick and dirty, but working.