formatted code with the same mule style and added tests