old comments
add nmax as option
print failure error
fix command line options
removed batch shit