separated broadcast receiver code from oncreate