Take your time and read the complete SAF thread... there are also a lot of examples available...
Taifun