removing unused variable causing warning