added destory functionality