still trying to get encrypted key working