updated accoridng to homework section