removed unnecessary variables and parameters