updated parts b and d, need to check them though