Created new width extraction algorithm