add page_safe decorator