re-write in bdd style