separate servcie and endpoint