add onload script for invoking functions