Changed function to accept const key