added dynamic update with slider