add some tests and the ability to create objects via hashes