handle end scenario with hash (for tags)