Uploaded general case code