Finalized  and functions as intended so far.