add save contact function
refactor some function