improve perfomance in the best case