most of hw3 working