first version;with some bug