fix the performance issure