fix some warinigs by removing unused variables