updated class with function to read all buttons at once