updated home page
added more template logic