fixed circular deps bug
add grouping