Mass functions from the excursion set model