added indirect support, untested
Merge branch 'master' of https://github.com/willxie/comp_421