function to get system type