Added SD only code