some minor changes for readability