done for single page app