fixes to increase speed