adding script onload fn