added type stack to context