formatted code, removed log