reorganizing code
merge