adding some random functions, and default reset behavior was modified