removed unused variable and fixed buggy indentation