removed unneeded then function