changed function calls --> OnRequest