reorganzing with new code