Added loop tests and if else test