Project 4 commit 3

Done through second function