fixed unused statement and commented code