changed to two request hooks