added then statement and checked all work.