tests written; unnecessary code removed