refactored
merge
initialize valiables using arguments