minor syntactic changes for readability