Implemented basic for\while loop