//10 refactor code