Add algorithm to paper