many changes. now working on rpi.