updated comments and some kind of reordering commands