modify to use macro instead of mathematical function to get powered numbers