add logic for grub