Added load function in window