optimize the performance