remove unused and complex func