added option flag to retreive the open key