adjusted some time and fixed minor bug