added scalar product