Updated Class to work with new arduino sketch