I basically looked at how it was done elsewhere (L351) and copied that =P