freq homework. some minor updates