edited code to fix issues with bill submission and saving in S3