move code to click
merge codes