cleaned up structure and prettyify