splite function in apart of small funcs