CHANGED: refactored request handling