added code for assignment