fixed ep param usage
removed unused parameter
removed unused variable