re-oragnized code