extracted interfaces and added mock services