add hasbeenloaded check