complite code, but there must be some bugs….