added some home page logic