add coding, but there are bugs