cleaning main and adding HW test