Done as a part of CS252 assignment (Lab 3)