support both 7 and 8