corrected some code and updated links