add destory function, fix ios issues and redefine methods