Wow... This is amazing, I didn't know there were so many way's of doing this! Thank you every one for all your suggestions. I particularly like the sorting counting ones. And no, Roy, this isn't a home work assignment, at the moment all of those contain php and java RMI. :)