got rid of some extra brackets, with help from the lovely Anita