updated for hook