add onrefresh handler