Iterating version number and adding defferred and promise correctly.