passing this into function to get html context