first cut at assigning self types to objects