list command; fixed some code alignment