updated for assignment3