Updating the computeSize method in order to consider borders

Updating the computeSize method in order to consider borders