remove memset and delay