implemented David's changes