Modified complexstore.rb