Final code

final changes