update branch module
add main logic and demo