resolved warnings about unused variables or dead code