update bytes calculation