added basic object support. Fixes #2.