fixed searching so that it puts things in alphabetical order and doesn't randomly move things around