better superscript implementation