Removed explicit cast and changed parameter type