homework upload and added common_method.rb and modified all models accordingly