add promise handlers to service

There are some comments in the code to explain what I wrote. Let me know if you have any more questions! :)