minor code refactor in homescreen