updated to not be dependent on content on load