added debug mode before moving code around
first test worthy code for the pi