new_tab function was splitted more small functions related #13