pattern for extending objects