Made column width calculation dynamic