improve performance a bit