made hooks optional