the init of  gift function