some performance inprovements