working dynamic list with input