added convenience function elementType