fixed some bugs and added a link