one more point, keep it in a loop. Your program would exit just after single iteration.