hw4 - revamped