added a width ratio, hopfully this will keep the width small even if the file isn't long