use better implementation