implemented both the parts