return error instead of throwing; add no data scenario