Corrected writing function signature with generic parameters after implemeting test.