another attempt at correct content length