debug code taken out, maybe working