implemented API interaction
changed background persistence to true just to make sure you're connected at all times