Added if and while statements.