added legality checks to bidTransaction - seems to work