modify family logic
add comments