add onStop method