completed assignment code