now using interfaces instead of realizations