slowly but surely getting this bloody search thing to work!