Make algorithm a function to be imported and called by main script.