very naive, performance can be improved
same to remove element
use stack