updated service provider
added tests