cleaning up the selection process, but still too complicated for my liking