Finished first implementation