added services and a broadcast receiver