added more code, not finish yet.