Adding Joshua's code to github.