divide code into widger and tracker