working on onload function to work