just one more hack, er, refactoring