hi vally,
Have you looked at this thread?
I would check out the function examples david wells mentions too, in there, as there are tons of examples that might be useful.