refined the motion_model_resource.rb