completed strrev with stack implementation