fixed some errors,now it's working