Added isBackgrounded method