add hardware support,and make some improvement with it