updated find_or_initialize
added error test
improved test coverage