updated hardware code with new features