add while and modify board