Bug fixing

final version and submission