got global variables working for default and home view