raise error if legendinterface is not specified and needed
fix raise error
added licence