printing output should be done in a loop...