improving promise test