add publish switch function
add version info