changed method to determine system type