fixed indentation and compatibility issues