updated for homework