some small performance changes