made changes as per the instructior's suggestion