better module checking