added dependency input, and wrote a nice generalised output commend
quick bug fix
Stat prerequisites are optional.
Merged with main repository.