add onload functionality to custom parameters and added support for chaining multiple pairs together