some big changes, fixed the selected indexing. man its confusing