Finished UpdateSelect(), refactored a little bit