tweaks to piface code