done some changes for refractoring purposes
solve conflict