added list action to controller and replaced all echos with console calls