Hacked algorithm into a figure using a tabular