fixed an issue with part b