added more comments and some more code for -l