add get functions.

edited from GitHub.com
Please, consider this change. Thanks.