Modified version for completed assignment