remove global variable goof
add ping feature for #1
remove extra newline for #2