added support for scalar product