Implemented for loop and improved set function.
Enhanced if and if-else, implemented or.