misc func fixes + rsa example