make function
complite but no optimizetion