add best fit algorithm