remove comment test
change runtime function and switch statement

make change according to the solution from stackoverflow
remove tabId option