first pass at crazy code