updated my homework with better syntax