pass key as argument for success