now with working hooks