implemeneted method, test passed