finished program, needs tests