all functionality in place! dirty, but stable