allow defining elements via function