splitted new_tab function more small funcitons related #13