add close logic, instance check
add license