added textbook with function on js