redo some of these routines