minor format change and bug fixing