width equation updated, removed some console logs