draw thumb and update code refactoring