Added upset functionality
More tests to verify upsert