some never used variables removed