complete main func
merge conflict