add type information
reduce repetions for run-time