trow error if key is not found