Effective theory for heavy quarks