fixed hasitem to the newer __contains__ syntax