refactored list method