restructuring for more control when arduino junk comes into play