algorithms macro / library