completed the code without testing