fixed brackets and missing headers