changes from alex
added the newer definition from koutis