add struction and function