shouldn't some of this be cleaned up?