re-written in crm2.rb