Remove rd from onAttach
Add parameters to control the update frequency