imported hw1 stuff