adding a scalar case to logm and testing it