javascript done, needs remove option
fully functional version