refactored listings controller