some attempts to tune the performance