updated for exponetiation