some code edits