part a part b bug fixed