refactored with express