modified home template and timeout code