add get functions.

edited from GitHub.com