simplifying raspi routine