some changes, v1.0 of the code