Split in 2 functions done! :) Added more tests.