added execute and checkBG functions