unnecessary variables removed