Added alternative implementation of width.sh