code looks nicer and a typo is fixed