cleaned up unused variables and formatted the output a bit