finish function 9