Added tests and completed step 3