updated to newst version of @haukepetersen's definiton