slight refactor
added skeleton code from openssl wiki