removed -Wunused-variable warnings