Code

restructure main() to stop looping on -n