reorganizing code
reorganizing code