for statement working