adding .then() method