first pass at fixing this...