Code by chen after Working