removed cast and unused parameter